Sherlock And Anagrams Hackerrank Solution In Java